package com.beordie.dao;

import com.beordie.model.Driver;
import com.beordie.model.Police;

import java.util.List;

/**
 * @Classname
 * @Description TODO
 * @Date 2021/7/13 17:16
 * @Created 30500
 */
public interface IPoliceDao {
    String SQL_SELECT_ALL = "SELECT * FROM POLICE";
    String SQL_SELECT_ALL_BY_LIMIT = "SELECT * FROM POLICE LIMIT ? , ?";
    String SQL_INSERT_ONE = "INSERT INTO POLICE VALUES(NULL,?,?,?,?,?,?)";
    String SQL_DELETE_BY_ID = "DELETE FROM POLICE WHERE ID = ?";
    String SQL_UPDATE_BY_ID = "UPDATE POLICE SET NUMBERPOLICE = ?, NAME = ?, NUMBER = ?, SEX = ?, ADDRESS = ?, PHONE = ? WHERE ID = ?";
    String SQL_SELECT_BY_NUMBER = "SELECT * FROM POLICE WHERE NUMBERPOLICE = ?";
    String SQL_SELECT_COUNT = "SELECT COUNT(1) FROM POLICE";

    public List<Police> getAll();
    public List<Police> getAllByLimit(boolean isLimit, int start, int size);
    public int insert(Police police);
    public int deleteById(int id);
    public int updateById(Police police, int id);
    public Police findByNumName(String condition);
    public int getCount();
}
